package com.wxx.observer;

/**
 * @author Jetwang
 * @version 1.0
 * @date 2022/5/27 21:15
 */
public class Test {
    public static void main(String[] args) {
        Course course = new Course("《Java从一窍不通到一无所有》");
        Teacher teacher = new Teacher("Jack");

        course.addObserver(teacher);

        // 问题
        Question question = new Question();
        question.setUserName("Jet");
        question.setQuestionContent("如何进大厂?");

        course.produceQuestion(course, question);
    }
}
